home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 17 / CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso / CUCD / Programming / DiceSource / src / editors / AME / Rexx / template.ame < prev    next >
Encoding:
Text File  |  1994-02-01  |  580 b   |  31 lines

  1. /* $VER: Template 37.1 (21.2.93) 
  2. /* demo the template function */
  3. /* This function should be bound to the RETURN key */
  4.  
  5. options results
  6.  
  7. table.this = 1
  8. table.is = 1
  9. table.a = 1
  10. table.line = 1
  11.  
  12. 'getline'
  13. line = result
  14. lastword = words(line)
  15. if lastword > 0 then do
  16.     do i = 1 to lastword
  17.     thisword=UPPER(word(line,i))
  18.     say table.thisword
  19.  
  20.     if table.thisword = 1 then do
  21.         index = wordindex(line,i)
  22.         line = delword(line,i,1)
  23.         newword = upper(thisword) || ' '
  24.         line = insert(newword,line,index-1)
  25.         end
  26.      end
  27.     'deleteline'
  28.     text line
  29.     end
  30.  
  31. 'insertline'